package formbeans;

import java.util.ArrayList;
import java.util.List;

import org.mybeans.form.FormBean;

public class SurveyTitleForm extends FormBean {

	private String title;
	private String type;
	
	public String getTitle() {
		return title;
	}
	public String getType() {
		return type;
	}

	public void setTitle(String title) {
		this.title = trimAndConvert(title,"<>\"");
	}
	public void setType(String type) {
		this.type = type;
	}
	
	public List<String> checkSurveyTitleFormErrors(){
		List<String> errors = new ArrayList<String>();
		
		if(title == null || title.length() == 0){
			errors.add("Please enter a title");
		}
		
		return errors;
	}
}